package com.hdax.dm.controller;
/**
 * 商品详情查询
 */

import com.hdax.dm.dto.CommonResponse;
import com.hdax.dm.dto.DtoUtil;
import com.hdax.dm.service.ItemDescService;
import com.hdax.dm.vo.ItemDescVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

@RestController
public class ItemDescController {

    @Autowired
    private ItemDescService itemDescService;

    @PostMapping(path = "/getItems")        //查询商品详情
    public CommonResponse<ItemDescVo> itemDesc(@RequestBody Map<String,Long> params){
        Long id = params.get("id");
        return DtoUtil.returnSuccess("",itemDescService.itemDesc(id));
    }

}
